package com.ling.feign.plus.exception;

import com.ling.common.exception.BaseBusinessException;
import com.netflix.hystrix.exception.HystrixBadRequestException;

public abstract class BaseFeignServerBusinessException extends HystrixBadRequestException {

    private static final long serialVersionUID = 1L;

    protected BaseBusinessException baseException;

    public BaseFeignServerBusinessException(String message) {
        super(message);
    }

    public BaseFeignServerBusinessException(String message, BaseBusinessException exception) {
        super(message);
        this.baseException = exception;
    }

    public abstract BaseFeignServerBusinessException throwException(String message, BaseBusinessException exception);

    public BaseBusinessException getBaseException() {
        return baseException;
    }

}
